package com.lwz.laboratory.service;

import com.lwz.laboratory.dao.PostMapper;
import com.lwz.laboratory.entity.Post;
import com.lwz.laboratory.entity.Recruitplan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class PostService {

    @Autowired
    PostMapper postMapper;


    public List<Post> findbyplanid(String planid) {
        return postMapper.findbyplanid(planid);
    }

    public void AddPost(Post post){
        postMapper.insertSelective(post);
    }

    public void DelPost(Integer id){

        postMapper.deleteByPrimaryKey(id);
    }

    public Post findonebyid(Integer id){
       return  postMapper.selectByPrimaryKey(id);
    }
    public Post findonebypostid(String postid){
        return  postMapper.findbypostid(postid);
    }

    public Post toface(Integer signid){
        return  postMapper.toface(signid);
    }


    public List<Post> selectSignupPost(String planid) {
        return postMapper.selectSignupPost(planid);
    }



}
